/**
 * @param {number} low
 * @param {number} high
 * @return {number[]}
 */
 var sequentialDigits = function (low, high) {
    let num = '123456789'
    let len = num.length
    let min = low.toString().length
    let max = high.toString().length
    let res = []
  
    while (max >= min) {
      for (let i = 0; i <= len - min; i++) {
        let ret = num.substr(i, min)
        if (ret >= low && ret <= high) {
          res.push(ret)
        }
      }
  
      min++
    }
    return res
  };